How can I optimize PHP code for finding user rank in a large array of JSON objects

welcome to shbcf.ru